package com.ruoyi.common.security.utils;


public class SM4Utlis {
//    private Log logger;
//    private final Log logger;

    public static String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    private static String key = "7788554496332100";

    public static boolean matches(CharSequence rawPassword, String encodedPassword) {

        if (rawPassword == null) {
            throw new IllegalArgumentException("rawPassword cannot be null");
        } else if (encodedPassword != null && encodedPassword.length() != 0) {
            if (rawPassword.toString().equals(encodedPassword)) return true;
            else return false;
        } else {
            System.out.println("encodedPassword is empty!!");
            return false;
        }
    }

}
